* {
    margin: 0;
    padding: 0;
}

.music-box {
    text-align: center;
    width: 300px;
    margin: 100px auto;
    position: relative;
}

.bg {
    border-radius: 50%;
    width: 300px;
    animation: rotate 5s linear infinite;
}

.play-btn {
    width: 60px;
}

.play-item {
    width: 111px;
    position: absolute;
    top: -85px;
    transform: rotate(-30deg);
    transform-origin: 30px 30px;
    z-index: 2;
}

.play {
    animation-play-state: running;
}

.pause {
    animation-play-state: paused;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg);
    }
    50% {
        transform: rotate(180deg);
    }
    75% {
        transform: rotate(270deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes itemPlay {
    0% {
        transform: rotate(-30deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.rotated {
    animation: itemPlay 2s linear;
    /* 设置动画完成的状态 */
    /* forwards backwards */
    animation-fill-mode: forwards;
}
@keyframes itemPause {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-30deg);
    }
}
.rotateds {
    animation: itemPause 1s linear;
    /* 设置动画完成的状态 */
    /* forwards 停在最后一帧 backwards 停在第一帧 */
    animation-fill-mode: forwards;
}
